home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / mo_mallb.zip / STORES.BAS < prev    next >
BASIC Source File  |  1992-04-21  |  1KB  |  34 lines

  1.     The Following is the QBasic source to read the IDX and DAT files for
  2.  the MO-MALL Store files.  I have included it in case you would like to
  3.  make anything that utilizes the files or anything else.  It is basically
  4.  self explanatory.  The BLANK was reserved for a feature that was never
  5.  added but I decided to reserve it in case anything needs to be added that
  6.  i missed or if any other programs want to use it. 
  7.  
  8. OpenStore:
  9.     TYPE IDX
  10.         num AS INTEGER          'Internal - Used for Sorting, Etc.
  11.         pref AS STRING * 6      'Product Reference ID
  12.         sdesc AS STRING * 54    'Short Description
  13.         desc1 AS INTEGER        'Location of each of the lines in
  14.         desc2 AS INTEGER        'the description or 0 if there is
  15.         desc3 AS INTEGER        'no line to refer to.  I did it in
  16.         desc4 AS INTEGER        'this format so that descriptions
  17.         desc5 AS INTEGER        'could be added/changed while
  18.         desc6 AS INTEGER        'hopefully keeping the code smaller
  19.         desc7 AS INTEGER        'then it need be.
  20.         BLANK AS INTEGER        'Blank - has no use (a Woops)
  21.         price AS SINGLE         'Price of the product.
  22.     END TYPE
  23.     TYPE DAT
  24.         ln AS STRING * 72
  25.     END TYPE
  26.        
  27.     DIM pinfo AS IDX
  28.     DIM pdesc AS DAT
  29.        
  30.     OPEN "R", 1, Store$ + ".Idx", LEN(pinfo)
  31.     OPEN "R", 2, Store$ + ".Dat", LEN(pdesc)
  32.        
  33.  
  34.